package com.itentbase.match.pojo.enums;

/**
 * 代码信息
 *
 * @author mek
 * @date 2023/4/7
 */
public enum ResponseEnum {

    /**
     * 系统基本信息0-1000
     */
    SUCCESS(200, "操作成功"),
    FAILURE(400, "操作失败"),
    REQUEST_ERROR(100, "请求错误"),
    SERVER_INTERNAL_ERROR(500, "服务端内部错误"),
    SERVICE_EXCEPTION(600, "业务逻辑错误"),

    //Exception
    BIND_EXCEPTION(550,"参数校验错误"),
    METHOD_ARGUMENT_NOT_VALID_EXCEPTION(551,"方法参数验证校验异常"),
    CONSTRAINT_VIOLATION_EXCEPTION(552,"数据完整性约束校验失败"),

    //data
    DATA_EMPTY(10,"数据不能为空"),
    DATA_IS_NOT_EXIST(11, "数据不存在"),

    NO_PERMISSION(401,"操作失败，没有权限"),
    NOT_LOGIN(402,"登录过期，请重新登录"),

    REMOVE_SUCCESS(700, "删除成功"),
    REMOVE_ERROR(701, "删除失败"),
    SAVE_SUCCESS(702,"保存成功"),
    SAVE_ERROR(703,"保存失败"),
    DATA_EXIST(750, "数据已经存在"),

    LOGIN_ERROR_USER_NONENTITY(800, "登录失败，用户名不存在"),
    LOGIN_ERROR_OPEN_ID_NONENTITY(801, "操作失败，用户数据已过期，请重新登录"),
    LOGIN_ERROR_PASSWORD_ERROR(802, "登录失败，密码错误"),

    SAVE_ERROR_BET_TYPE_NONENTITY(900, "下注失败，下注类型不存在"),
    SAVE_ERROR_BET_NUMBER_NONENTITY(901, "下注失败，下注期号不存在"),
    SAVE_ERROR_BET_DATA_ERROR(901, "下注失败，下注期号不存在"),


//    user
    USER_UPDATE_FAIL(1000,"修改用户信息失败"),
    ROLE_CANNOT_UPDATE_SYS_ROLE(1101, "不能修改系统默认角色信息"),
    ROLE_CANNOT_DELETE_SYS_ROLE(1102, "不能删除系统默认角色信息"),

    OPERATION_FAILED(1103, "操作失败,请联系管理员"),

    CALL_TOO_OFEN(1100,"请求太频繁，请稍后再试"),


    //FootballMatchCombination
    COMBINATION_IS_EXIST(1200,"今天推荐组合方案已经生成了"),
    COMBINATION_ERROR1(1201,"组合失败：必修选择2个及以上推荐方案进行组合"),
    COMBINATION_ERROR2(1202,"组合失败：请选择符合条件的推荐赛事进行组合"),

    //FootballMatchCombinationHistory

    REQUEST_CODE_INVALID(1300,"请求参数code无效"),
    REQUEST_DATA_UNFOUND(1301,"请求的数据不存在"),

//    FootballMatchSuggest
    FOOTBALLMATCHSUGGEST_PLAN_CAN_NOT_EMPTY(2000,"请在胜平负中选择推荐赛事结果")

    ;

    /**
     * 状态码
     */
    private int code;
    /**
     * 信息描述
     */
    private String message;
    ResponseEnum() {
    }
    ResponseEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }
    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
